﻿namespace TestTool.Tests.Common.Discovery
{
    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Reflection;
    using System.Xml.Schema;
    using TestTool.Proxies.WSDiscovery;
    using TestTool.Tests.Common.Soap;

    internal class DiscoverySoapBuilder : SoapBuilder
    {
        static DiscoverySoapBuilder()
        {
            Stream manifestResourceStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("TestTool.Tests.Common.Discovery.Schemas.xml.xsd");
            XmlSchema schema = XmlSchema.Read(manifestResourceStream, null);
            manifestResourceStream.Close();
            manifestResourceStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("TestTool.Tests.Common.Discovery.Schemas.soap-envelope.xsd");
            XmlSchema schema2 = XmlSchema.Read(manifestResourceStream, null);
            manifestResourceStream.Close();
            SoapBuilder._soapSchemas = new List<XmlSchema> { schema, schema2 };
            SoapBuilder.GetDeserializer<ProbeMatchesType>(SoapBuilder.GetAttributeOverrides<ProbeMatchesType>());
        }
    }
}

